home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16302 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.1 KB  |  46 lines

  1. Newsgroups: comp.lang.c++
  2. Path: netcom.com!marnold
  3. From: marnold@netcom.com (Matt Arnold)
  4. Subject: Re: Compiler bug in Borland C++ 5.0
  5. Message-ID: <marnoldDpLAwv.Apz@netcom.com>
  6. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  7. References: <316A22E0.47B6@ee.oulu.fi>
  8. Date: Tue, 9 Apr 1996 10:10:07 GMT
  9. Sender: marnold@netcom13.netcom.com
  10.  
  11. Arto Pesonen <artsi@ee.oulu.fi> writes:
  12.  
  13. >Try setting data aligment to other than byte and compile OWL project.
  14. >Virtual function InitMainWindow is not called with this setup (Double 
  15. >word or quad word). With word aligment program crashes. Byte aligment 
  16. >always work.
  17.  
  18. This is probably because the OWL libraries are compiled with byte
  19. alignment.  If so, you can't use them with any other alignment unless 
  20. you recomplie the OWL libraries for the alignment you want to use.
  21. Should be possible.  Your Borland docs should contain information
  22. about recompiling the run-time library, OWL, etc..
  23.  
  24. The other option is to use the byte-alighnment you want, but make
  25. sure you place byte-alignment #pragma's around all your OWL #includes.  
  26. This will make sure no OWL code uses anything other than byte
  27. alignment, but yours can use something else.  I'm not sure if this 
  28. will catch everything, but it should be workable.
  29.  
  30. This is probably not a bug.  It's also probably documented somewhere.
  31. You'd have the same kind of problems compiling your own library for
  32. word alignment and then trying to #include your headers while using
  33. quad alignment, for example.
  34.  
  35. Your best bet is probably to just stick with byte alignment.  Why
  36. are you changing it anyway?
  37.  
  38. Regards,
  39. -------------------------------------------------------------------------
  40. Matt Arnold                       |        | ||| | |||| |  | | || ||
  41. marnold@netcom.com                |        | ||| | |||| |  | | || ||
  42. Boston, MA                        |      0 | ||| | |||| |  | | || ||
  43. 617.389.7384 (h) 617.576.2760 (w) |        | ||| | |||| |  | | || ||
  44. C++, MIDI, Win32/95 developer     |        | ||| 4 3 1   0 8 3 || ||
  45. -------------------------------------------------------------------------
  46.